package com.zxl.always.on.display.ui.widget;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.zxl.always.on.display.R;

/**
 * Created by Administrator on 2018/3/1.
 */

public class NotificationLayout extends LinearLayout {

    public NotificationLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public void addNotification(Drawable drawable) {
        View view = LayoutInflater.from(getContext()).inflate(R.layout.widget_notification_item, null);
        ImageView imageView = view.findViewById(R.id.panel_missed_noti_icon);
        imageView.setImageDrawable(drawable);
        addView(view);
    }

}
